<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" href="PythonCard.css"  type="text/css"/>
    <meta name="author" content="Phil Edwards" />
    <title>Installing PythonCard on Linux</title>
  </head>
  <body>
    <div id="banner">
    <h1>How to Install PythonCard on Linux</h1>
    </div>
    <?php include "sidebar.php" ?>
    <div id="content">
    <p>We currently have instructions for installing PythonCard on 
    <a href="#mandrake">Mandrake</a> and <a href="#debian">Debian</a>.</p>
    <h2><a id="mandrake">Mandrake Linux Using RPM's</a></h2>
    <p>The notes below concentrate specifically on installing PythonCard from RPMs on
    a Mandrake system. For other Linux distributions which also use the RPM format for
    packages (for example, SuSE, RedHat or Fedora) the process will be broadly similar,
    but you should take care to select the correct versions of the various RPMs that
    are required. Installing PythonCard on a Linux system requires the following steps:</p>
    <ol>
      <li>Ensure that you have a suitable version of Python installed.</li>
      <li>Download the wxPython RPM from the wxPython.org site.</li>
      <li>Download PythonCardPrototype RPM from the PythonCard site.</li>
      <li>Install wxPython.</li>
      <li>Install PythonCardPrototype.</li>
      <li>Confirm the installation works.</li>
    </ol>
    <h3>Check your Python version</h3>
    <p>PythonCard requires that you have Python 2.3 or higher 
    installed. At the time of writing, it is known that all versions of Mandrake 
    Linux from 9.1 upwards install a suitable Python version by default. If you 
    are still using version 9.0 or lower, you really should think seriously about
    upgrading.</p>
    <p>To check what version you have installed, open up a shell session (xterm, 
    konsole, gnome-terminal, etc, etc) and type the following:</p>
    <p class="code">$ python<br />
    Python 2.3 (#2, Aug 31 2003, 17:27:29)<br />
    [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2<br />
    Type "help", "copyright", "credits" or "license" for more information.<br />
    &gt;&gt;&gt; (Type Ctrl-D here to exit)</p>
    <p>This Linux system has Python 2.3 installed, so there's no problem here. :-)</p>
    <h3>Downloading the wxPython RPMs</h3>
    <p>PythonCard relies on the wxPython package. The specific wxPython RPMs you will
    need (at the time of writing, at least) are as follows:</p>
    
    <p>
    <a href="http://prdownloads.sourceforge.net/wxpython/wxPython-common-gtk2-unicode-2.5.4.1-mdk101_py2.3.i586.rpm">wxPython-common-gtk2-unicode-2.5.4.1-mdk101_py2.3.i586.rpm</a>
    <a href="http://prdownloads.sourceforge.net/wxpython/wxPython2.5-gtk2-unicode-2.5.4.1-mdk101_py2.3.i586.rpm">wxPython2.5-gtk2-unicode-2.5.4.1-mdk101_py2.3.i586.rpm</a>
    </p>
    
    <p>Whilst the versions of wxPython which are built against the older GTK1.0
    libraries will work, the GTK2 versions offer some advantages
    as far as Mandrake is concerned (widgets look slightly 'nicer' and
    execution speed is improved) and it is these which are recommended.</p>
    
    <p>If you are installing on a distribution other than Mandrake, you should consult
    the wxPython download page
    at <a href="http://www.wxpython.org/download.php#binaries">http://www.wxpython.org/download.php#binaries</a>
    to determine the correct RPMs for your system.</p>
    
    <p>Save the files somewhere convenient on your system. Make a note of the location for later.</p>    
    
    <h3>Downloading the PythonCard RPM</h3>
    <p>The latest version of the PythonCard RPMs are always available via the
    <a href="http://www.linux2000.com/pythoncard.html">Linux2000 PythonCard page</a>
    , and are also mirrored on the main Pythoncard site on SourceForge - <a href="http://sourceforge.net/project/showfiles.php?group_id=19015">click here</a>
    to go to the download page. Supported Mandrake Linux distributions for RPM installation are 10.0 and 10.1 in
    both <em>Community</em> and <em>Official</em> flavours.</p>
    <p>Download <a href="http://www.linux2000.com/downloads/PythonCard-0.8.2-1mdk.noarch.rpm">http://www.linux2000.com/downloads/PythonCard-0.8.2-1mdk.noarch.rpm</a>
    and save the file somehwere convenient as before.</p>
    
    <h3>Installing the wxPython RPMs</h3>
    <p>Type 'su -' and enter your root password when prompted. The command to 
    install the RPM is:</p>
    <p class="code">rpm -Uvh /home/fred/wxPython-common-gtk2-&lt;type and version number&gt;.i386.rpm</p>
    <p class="code">rpm -Uvh /home/fred/wxPython2.5-gtk2-&lt;type and version number&gt;.i386.rpm</p>
    <p>You should replace &quot;/home/fred&quot; with the full path to where your
    browser saved the downloaded RPM and substitute the correct file type and
    version number of the file you have downloaded.</p>
    
    <h3>Installing PythonCard</h3>
    <p>The command to install the PythonCard RPM is pretty similar:</p>
    <p class="code">rpm -Uvh /home/fred/PythonCard-0.8.2-1mdk.noarch.rpm</p>
    <p>Again, replace &quot;/home/fred&quot; with the full path to where your 
    browser saved the RPM, and substitute the relevant RPM file name for you 
    distribution.</p>
    
    <h3>Confirming Installation</h3>
    <p>We'll run the PythonCardPrototype &quot;minimal&quot; application to check 
    that the installation seems OK.  To run this, open a shell prompt as your 
    normal user, and type the following:</p>
    <p class="code">/usr/share/PythonCard/samples/minimal/minimal.py</p>
    <p class="imageCaption"><img src="http://pythoncard.sourceforge.net/images/snapminimal_01.png" alt="PythonCard minimal application window open to confirm installation is correct" /><br />
    Figure 1. PythonCard minimal application window open to confirm installation
    is correct</p>
    <p>If you see any error messages in your shell prompt window at this stage, 
    and it's not immediately obvious what the problem is, post a message to the 
    PythonCard Users mailing list - see the bottom of this page for details.</p>
    <p>Assuming that the minimal application starts up okay, you can browse the 
    other PythonCard sample applications with the command:</p>
    <p class="code">/usr/share/PythonCard/samples/samples.pyw</p>
    
    <h3>PythonCard Menu Items</h3>
    <p>You will find some new items on the window manager menu - the PythonCard 
    resource editor will be found under Applications --&gt; Development --&gt; 
    Development environments, whilst the PythonCard code editor and samples 
    launcher will be found under Applications --&gt; Development --&gt; Tools.</p>
    
    <h3>If You Are Having Problems</h3>
    <p>Installing the software from RPM <i>ought</i> to be fairly straightforward.
    If for some reason either the RPM's won't install, or the minimal application
    doesn't run, go back over these instructions carefully. In particular, make 
    sure that wxPython and PythonCard both appear in the site-packages 
    folder in Python's lib folder.</p>
    <p>If everything seems OK and you still can't get minimal.py to launch, post
    a message to the PythonCard Users Mailing List. (If you aren't yet a member, 
    visit the <a href="http://lists.sourceforge.net/lists/listinfo/pythoncard-users">list management page</a>
    and join.)</p>
    <h2><a id="debian">Installing on Debian</a></h2>
    <p>PythonCard is available in the testing and unstable distributions. To 
    install it su to root and type:</p>
    <p class="code"># apt-get install pythoncard</p>
    <?php include "footer.php" ?>
    <p>$Revision: 1.16 $ : $Author: alextweedly $ : Last updated $Date: 2006/04/06 11:00:25 $</p>
    </div> <!-- end of content -->
  </body>
</html>
